﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Super.Core.CodeHelper;
using Super.Core.Utility;

namespace Super.Core.Builder
{
    public class BaseBuilder
    {
        #region "私有成员"
        private List<ColumnInfo> _fieldlist;
        private List<ColumnInfo> _keys;
        private string _namespace;
        private string _tablename;
        private bool _isHasIdentity;
        private string _dbtype;
        #endregion

        #region "公有属性"

        /// <summary>
        /// 选择的字段集合
        /// </summary>
        public List<ColumnInfo> Fieldlist
        {
            set { _fieldlist = value; }
            get { return _fieldlist; }
        }
        /// <summary>
        /// 主键或条件字段列表 
        /// </summary>
        public List<ColumnInfo> Keys
        {
            set { _keys = value; }
            get { return _keys; }
        }
        /// <summary>
        /// 顶级命名空间名
        /// </summary>
        public string NameSpace
        {
            set { _namespace = value; }
            get { return _namespace; }
        }
        /// <summary>
        /// 表名；
        /// </summary>
        public string TableName
        {
            set { _tablename = value; }
            get { return _tablename; }
        }
        /// <summary>
        /// Model类名
        /// </summary>
        public string ModelClassName
        {
            get { return _tablename; }
        }
        /// <summary>
        /// BLL类名
        /// </summary>
        public string BLLClassName
        {
            get { return "BLL" + _tablename; }
        }

        /// <summary>
        /// 接口名
        /// </summary>
        public string IDALClassName
        {
            get { return "I" + _tablename; }
        }
        /// <summary>
        /// DAL类名
        /// </summary>
        public string DALClassName
        {
            get { return "DAL" + _tablename; }
        }

        /// <summary>
        /// 是否有自动增长标识列
        /// </summary>
        public bool IsHasIdentity
        {
            set { _isHasIdentity = value; }
            get { return _isHasIdentity; }
        }

        /// <summary>
        /// 数据库类型
        /// </summary>
        public string DbType
        {
            set { _dbtype = value; }
            get { return _dbtype; }
        }

        #endregion

    }
}
